import java.util.Arrays;

public class SystemTest {
    public static void main(String[] args) {
        int[] arr = {10, 20, 30, 40, 50};
        int[] nums = new int[10];

        //把arr数组的元素 复制到 nums数组中
//        System.arraycopy(arr, 0, nums, 0, arr.length);
//        System.arraycopy(arr, 0, nums, 3, arr.length);
        System.arraycopy(arr, 1, nums, 3, 4);

        System.out.println("arr的元素：" + Arrays.toString(arr));
        System.out.println("nums的元素：" + Arrays.toString(nums));
        //nums的元素：[10, 20, 30, 40, 50]
        //nums的元素：[0, 0, 0, 10, 20, 30, 40, 50, 0, 0]
        //nums的元素：[0, 0, 0, 20, 30, 40, 50, 0, 0, 0]
    }
}
